package com.asura.ops.sync.check.server.mapper;

import com.asura.ops.sync.check.server.dto.CfgDbDto;
import com.asura.ops.sync.check.server.entity.CfgClientDbEntity;
import com.asura.ops.sync.check.server.entity.CfgClientTableFieldEntity;
import com.asura.ops.sync.check.server.entity.CfgDbEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 监听数据库实例信息 Mapper 接口
 * </p>
 *
 * @author Mars
 * @since 2022-08-05
 */
public interface CfgDbMapper extends BaseMapper<CfgDbEntity> {

    CfgDbDto selectCfgDbBy(@Param("clientCode") String clientCode, @Param("clientTable") String clientTable);

    CfgClientDbEntity selectCfgClientDbBy(@Param("clientCode") String clientCode, @Param("clientDbName") String clientDbName);

    List<CfgClientTableFieldEntity> selectCfgClientTableFieldBy(@Param("clientCode") String clientCode,
                                                                @Param("clientDbName") String clientDbName,
                                                                @Param("clientTable") String clientTable);

    List<CfgClientDbEntity> selectCfgClientDbList();

    List<CfgClientTableFieldEntity> selectCfgClientTable(@Param("clientCode") String clientCode, @Param("clientDbName") String clientDbName);
}
